package com.cxs.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Project: wechat-push
 * @Author: cxs2014501@163.com
 * @Create: 2023/9/7 9:54
 * @Description:
 **/
@Configuration
public class RestTemplateConfig {

    @Bean
    public RestTemplate restTemplate(){
        RestTemplate restTemplate = new RestTemplate();
        //处理content-type=application/javascript的HttpMessageConverter
        restTemplate.getMessageConverters().add(new MyApplicationJavascriptHttpMessageConverter());
        return restTemplate;
    }
}
